import axios from 'axios';

const api = axios.create({
  baseURL: "http://localhost:5000",
  timeout: 10000
});

// 消息服务
export const messageApi = {
  sendMessage: (data) => api.post('/api/messages/send', data),
  queryLogs: (params) => api.get('/api/messages/logs', { params })
};

// 账号服务
export const accountApi = {
  getAllAccounts: () => api.get('/api/accounts'),
  setCurrentAccount: (accountId) => api.post('/api/accounts/current', { accountId })
};